# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=mkinitcpio-systemd-tool
pkgver=37
pkgrel=3
pkgdesc="Provisioning tool for systemd in initramfs (systemd-tool)"
arch=(any)
url="https://github.com/random-archer/mkinitcpio-systemd-tool"
license=(Apache)
depends=(
  bash
  mkinitcpio
  systemd
)
optdepends=(
  'busybox: for initrd-tinysshd.service'
  'cryptsetup: for initrd-cryptsetup.service'
  'dropbear: for initrd-dropbear.service'
  'mc: for initrd-debug-progs.service'
  'nftables: for initrd-nftables.service'
  'tinyssh: for initrd-tinysshd.service'
)
conflicts=(
  mkinitcpio-dropbear
  mkinitcpio-tinyssh
)
backup=(
  etc/$pkgname/config/crypttab
  etc/$pkgname/config/fstab
  etc/$pkgname/config/initrd-nftables.conf
  etc/$pkgname/config/initrd-util-usb-hcd.conf
  etc/$pkgname/$pkgname.conf
  etc/$pkgname/network/initrd-network.network
)
source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
install=$pkgname.install
sha512sums=('1ad854e514fd7c5982f5e3d28b7276dc20dada94e0d8224bd02d83d0c787b3f311790888a0a8e6abd23ac59983a793b6f009697dbbeb6f40af6d18a42cc36181')
b2sums=('d5b6366de54c377b8d0afb23ca2d22809c65950ea53415793612a40cec8f3735d50e82203cb0951f5621d7ede905fe899382786e8a67cd70f5ec177ef36f3190')

package() {
  make DESTDIR="$pkgdir/" PREFIX=/usr install -C $pkgname-$pkgver
}
